package com.hm.ipay.domain.result;

import java.math.BigDecimal;
import java.util.List;

public class DataList {
    private Integer limit;
    private Integer offset;
    private Integer count;
    private Integer total;
    private List content;

    public DataList(Integer limit, Integer offset, Integer total, List content) {
        this.limit = limit;
        this.offset = offset;
        this.content = content;
        this.total = total;
        if (this.total.equals(this.limit)) {
            this.count = this.total / this.limit;
        } else {
            this.count = this.total / this.limit + 1;
        }
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public List getContent() {
        return content;
    }

    public void setContent(List content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "DataList{" +
                "limit=" + limit +
                ", offset=" + offset +
                ", count=" + count +
                ", total=" + total +
                ", content=" + content +
                '}';
    }
}
